package com.nuaa.shopping.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
/*
 * 订单
 */
public class Order implements Serializable {
	private Integer id; // 订单编号
	private User user; // 订单所属用户
	private String no; // 订单号
	private Double price; // 订单总价格
	private Date createDate; // 订单创建日期
	private Set<Item> items = new HashSet<Item>(); // 订单中包含的订单明细

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	
	public Set<Item> getItems() {
		return items;
	}

	public void setItems(Set<Item> items) {
		this.items = items;
	}

	@Override
	public String toString() {
		return "Order [id=" + id + ", user=" + user + ", no=" + no + ", price="
				+ price + ", createDate=" + createDate + "]";
	}

}
